package com.youen.service;

import com.youen.entity.Test;
import com.youen.repository.TestRepository;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Dell on 2018/9/6.
 */
@Service
public class TestService {

    @Autowired
    private TestRepository testRepository;


    public String test(){
        List<Test> list= testRepository.findAll();
        
        return JSONArray.fromObject(list).toString();
    }
}
